<template>
  <div class="myEvaluation">
    <div
      v-for="(item,index) in data"
      :key="index"
      class="evaluation">
      <div class="title">
        <h4><span></span>{{item.title}}</h4>
      </div>
      <div class="box">
        <el-table
          :data="item.project"
          border
          style="width: 100%">
          <el-table-column
            prop="name"
            label="测评项目"
            fixed
            width="300">
          </el-table-column>
          <el-table-column
            prop="completetime"
            label="测评日期"
            width="300">
          </el-table-column>
<!--          <el-table-column-->
<!--            v-if="result."-->
<!--            prop="result"-->
<!--            label="测评状态">-->
<!--          </el-table-column>-->
          <el-table-column
            fixed="right"
            label="测评状态">
            <template slot-scope="scope">
              <el-button
                @click.native.prevent="beginEvaluation(scope)"
                type="text"
                :disabled="scope.row.result==='开始测评'?false:true"
                size="small">
                {{scope.row.result}}
              </el-button>
            </template>
          </el-table-column>
        </el-table>
      </div>
    </div>
  </div>
</template>

<script>
    export default {
        name: "myEvaluation",
        data() {
            return {
                data: [
                    {
                        title: '高中生 · 升学测评系统',
                        project: [
                            {name: '高中生 • 升学专业选择测评系统', completetime: "未完成", result: "开始测评", jumpUrl: "/applyzytest", status: false}
                        ]
                    },
                    {
                        title: '高中生 · 选科测评系统',
                        project: [
                            {name: '第一次测评', completetime: "未完成", result: "开始测评", jumpUrl: "/applyzytest", status: 0},
                            {name: '第二次测评', completetime: "未完成", result: "未开启", jumpUrl: "/applyzytest", status: -1}
                        ]
                    }
                ]
            }
        },
        methods: {
            beginEvaluation(scope) {
                alert('跳转页面：'+scope.row.jumpUrl);
            }
        }
    }
</script>

<style scoped lang="scss">
  .myEvaluation{
    .evaluation{
      padding: 10px;
      .title{
        padding-bottom: 20px;
        h4::before{
          content: '';
          border: 2px solid #2e86ff;
          margin-right: 4px;
        }
      }
      .box{

      }
    }
  }
</style>